<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
Path (jersey-bundle 1.9 API)
</TITLE>


<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="Path (jersey-bundle 1.9 API)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Path.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/ws/rs/OPTIONS.html" title="annotation in javax.ws.rs"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/ws/rs/PathParam.html" title="annotation in javax.ws.rs"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html?javax/ws/rs/Path.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Path.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#annotation_type_required_element_summary">REQUIRED</A>&nbsp;|&nbsp;OPTIONAL</FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#annotation_type_element_detail">ELEMENT</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.ws.rs</FONT>
<BR>
Annotation Type Path</H2>
<HR>
<DL>
<DT><PRE><FONT SIZE="-1">@Target(value={TYPE,METHOD})
@Retention(value=RUNTIME)
</FONT>public @interface <B>Path</B></DL>
</PRE>

<P>
Identifies the URI path that a resource class or class method will serve 
 requests for.

 <p>Paths are relative. For an annotated class the base URI is the 
 application path, see <A HREF="../../../javax/ws/rs/ApplicationPath.html" title="annotation in javax.ws.rs"><CODE>ApplicationPath</CODE></A>. For an annotated
 method the base URI is the
 effective URI of the containing class. For the purposes of absolutizing a
 path against the base URI , a leading '/' in a path is 
 ignored and base URIs are treated as if they ended in '/'. E.g.:</p>
 
 <pre>&#64;Path("widgets")
public class WidgetsResource {
  &#64;GET
  String getList() {...}
 
  &#64;GET &#64;Path("{id}")
  String getWidget(&#64;PathParam("id") String id) {...}
}</pre>
 
 <p>In the above, if the application path is
 <code>catalogue</code> and the application is deployed at
 <code>http://example.com/</code>, then <code>GET</code> requests for
 <code>http://example.com/catalogue/widgets</code> will be handled by the
 <code>getList</code> method while requests for
 <code>http://example.com/catalogue/widgets/<i>nnn</i></code> (where 
 <code><i>nnn</i></code> is some value) will be handled by the
 <code>getWidget</code> method. The same would apply if the value of either
 <code>&#64;Path</code> annotation started with '/'.
 
 <p>Classes and methods may also be annotated with <A HREF="../../../javax/ws/rs/Consumes.html" title="annotation in javax.ws.rs"><CODE>Consumes</CODE></A> and 
 <A HREF="../../../javax/ws/rs/Produces.html" title="annotation in javax.ws.rs"><CODE>Produces</CODE></A> to filter the requests they will receive.</p>
<P>

<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../javax/ws/rs/Consumes.html" title="annotation in javax.ws.rs"><CODE>Consumes</CODE></A>, 
<A HREF="../../../javax/ws/rs/Produces.html" title="annotation in javax.ws.rs"><CODE>Produces</CODE></A>, 
<A HREF="../../../javax/ws/rs/PathParam.html" title="annotation in javax.ws.rs"><CODE>PathParam</CODE></A></DL>
<HR>

<P>
<!-- =========== ANNOTATION TYPE REQUIRED MEMBER SUMMARY =========== -->

<A NAME="annotation_type_required_element_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Required Element Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/ws/rs/Path.html#value()">value</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Defines a URI template for the resource class or method, must not 
 include matrix parameters.</TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->

<A NAME="annotation_type_element_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Element Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="value()"><!-- --></A><H3>
value</H3>
<PRE>
public abstract java.lang.String <B>value</B></PRE>
<DL>
<DD>Defines a URI template for the resource class or method, must not 
 include matrix parameters.
 
 <p>Embedded template parameters are allowed and are of the form:</p>
 
 <pre> param = "{" *WSP name *WSP [ ":" *WSP regex *WSP ] "}"
 name = (ALPHA / DIGIT / "_")*(ALPHA / DIGIT / "." / "_" / "-" ) ; \w[\w\.-]*
 regex = *( nonbrace / "{" *nonbrace "}" ) ; where nonbrace is any char other than "{" and "}"</pre>
 
 <p>See <a href="http://tools.ietf.org/html/rfc5234">RFC 5234</a> 
 for a description of the syntax used above and the expansions of 
 <code>WSP</code>, <code>ALPHA</code> and <code>DIGIT</code>. In the above <code>name</code>
 is the template parameter name and the optional <code>regex</code> specifies 
 the contents of the capturing group for the parameter. If <code>regex</code>
 is not supplied then a default value of <code>[^/]+</code> which terminates at
 a path segment boundary, is used. Matching of request URIs to URI 
 templates is performed against encoded path values and implementations
 will not escape literal characters in regex automatically, therefore any
 literals in <code>regex</code> should be escaped by the author according to
 the rules of
 <a href="http://tools.ietf.org/html/rfc3986#section-3.3">RFC 3986 section 3.3</a>.
 Caution is recommended in the use of <code>regex</code>, incorrect use can
 lead to a template parameter matching unexpected URI paths. See 
 <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html">Pattern</a>
 for further information on the syntax of regular expressions.
 Values of template parameters may be extracted using <A HREF="../../../javax/ws/rs/PathParam.html" title="annotation in javax.ws.rs"><CODE>PathParam</CODE></A>.

 <p>The literal part of the supplied value (those characters
 that are not part of a template parameter) is automatically percent 
 encoded to conform to the <code>path</code> production of 
 <a href="http://tools.ietf.org/html/rfc3986#section-3.3">RFC 3986 section 3.3</a>.
 Note that percent encoded values are allowed in the literal part of the
 value, an implementation will recognize such values and will not double
 encode the '%' character.</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Path.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/ws/rs/OPTIONS.html" title="annotation in javax.ws.rs"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/ws/rs/PathParam.html" title="annotation in javax.ws.rs"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html?javax/ws/rs/Path.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Path.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#annotation_type_required_element_summary">REQUIRED</A>&nbsp;|&nbsp;OPTIONAL</FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#annotation_type_element_detail">ELEMENT</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright &#169; 2011 <a href="http://www.oracle.com/">Oracle Corporation</a>. All Rights Reserved.
</BODY>
</HTML>
